﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using NetWing.Common.Data.SqlServer;

namespace NetWing.BPM.Admin.mjrooms
{
    public partial class roompayedit : NetWing.BPM.Core.BasePage.BpmBasePage
    {
        public string roomid = "";
        public string userids = "";
        public string orderid = "";
        public string edNumber = "";
        public DataTable dt = null;
        public string orderdetailids = "";//列出关联续费IDS
        public string fmainkeyid = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            roomid = Request["roomid"];
            userids = Request["userids"];
            orderid = Request["orderid"];
            edNumber = Request["ednumber"];
            string sql = "select * from MJFinanceDetail where ednumber='"+ edNumber + "'";
            SqlDataReader dr = SqlEasy.ExecuteDataReader(sql);
            while (dr.Read())
            {
                orderdetailids = orderdetailids + dr["orderdetailid"].ToString() + ",";
            }
            orderdetailids = orderdetailids + "9999";
            //得到财务主表KeyID(原则上一个财务主表只可能有一个订单ID)
            string fsql = "select top 1 * from MJFinanceMain where  edNumber='" + edNumber + "'";
            SqlDataReader fdr = SqlEasy.ExecuteDataReader(fsql);
            while (fdr.Read())
            {
                fmainkeyid = fdr["KeyID"].ToString();
            }


        }
    }
}